﻿save_dog_character_effect = {
	#Make sure that this list prioritizes other child vassals/heirs when the child being bullied is a player or player heir.
	save_temporary_scope_value_as = {
		name = $SCOPE$_relation
		value = yes
	}
	if = {
		limit = {
			NOT = { exists = scope:$RELATION$ }
			is_landed = yes
		}
		every_vassal = {
			limit = {
				save_dog_$RELATION$_character_trigger_check = yes
			}
			add_to_list = dog_relation_character
		}
	}
	if = {
		limit = {
			NOT = { exists = scope:$RELATION$ }
			is_landed = yes
		}
		every_courtier_or_guest = {
			limit = {
				save_dog_$RELATION$_character_trigger_check = yes
			}
			add_to_list = dog_relation_character
		}
	}
	if = {
		limit = {
			is_landed = yes
			NOT = { exists = scope:$RELATION$ }
			exists = liege
			NOT = { this = liege }
		}
		liege = {
			limit = {
				save_dog_$RELATION$_character_trigger_check = yes
			}
			add_to_list = dog_relation_character
		}
	}
	if = {
		limit = {
			NOT = { exists = scope:$RELATION$ }
		}
		#To actually pick the relation
		random_in_list = {
			list = dog_relation_character
			save_scope_as = $SCOPE$
		}
	}
}